<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Module: CalendarDateSelect::FormHelper</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Module</strong></td>
          <td class="class-name-in-header">CalendarDateSelect::FormHelper</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../files/vendor/plugins/calendar_date_select/lib/calendar_date_select_rb.html">
                vendor/plugins/calendar_date_select/lib/calendar_date_select.rb
                </a>
        <br />
            </td>
        </tr>

        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000009">calendar_date_select</a>&nbsp;&nbsp;
      <a href="#M000010">calendar_date_select_output</a>&nbsp;&nbsp;
      <a href="#M000008">calendar_date_select_process_options</a>&nbsp;&nbsp;
      <a href="#M000006">calendar_date_select_tag</a>&nbsp;&nbsp;
      <a href="#M000007">format_time</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000009" class="method-detail">
        <a name="M000009"></a>

        <div class="method-heading">
          <a href="#M000009" class="method-signature">
          <span class="method-name">calendar_date_select</span><span class="method-args">(object, method, options={})</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000009-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/calendar_date_select/lib/calendar_date_select.rb, line 146</span>
146:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calendar_date_select</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>={})
147:       <span class="ruby-identifier">obj</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:object</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-node">&quot;@#{object}&quot;</span>)
148:       
149:       <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:time</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value str">&quot;columns_hash&quot;</span>)
150:         <span class="ruby-identifier">column_type</span> = (<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">columns_hash</span>[<span class="ruby-identifier">method</span>.<span class="ruby-identifier">to_s</span>].<span class="ruby-identifier">type</span> <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>)
151:         <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:time</span>] = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">column_type</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:datetime</span>
152:       <span class="ruby-keyword kw">end</span>
153:       
154:       <span class="ruby-identifier">use_time</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:time</span>]
155:       
156:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:time</span>].<span class="ruby-identifier">to_s</span><span class="ruby-operator">==</span><span class="ruby-value str">&quot;mixed&quot;</span>
157:         <span class="ruby-identifier">use_time</span> = <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Date</span><span class="ruby-operator">===</span><span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">method</span>)
158:       <span class="ruby-keyword kw">end</span>
159:       
160:       <span class="ruby-identifier">calendar_options</span> = <span class="ruby-identifier">calendar_date_select_process_options</span>(<span class="ruby-identifier">options</span>)
161:       
162:       <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:value</span>] <span class="ruby-operator">||=</span> 
163:         <span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">method</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">method</span>).<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:strftime</span>))
164:           <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">method</span>).<span class="ruby-identifier">strftime</span>(<span class="ruby-constant">CalendarDateSelect</span>.<span class="ruby-identifier">date_format_string</span>(<span class="ruby-identifier">use_time</span>))
165:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-node">&quot;#{method}_before_type_cast&quot;</span>) 
166:           <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">&quot;#{method}_before_type_cast&quot;</span>)
167:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">method</span>)
168:           <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">method</span>).<span class="ruby-identifier">to_s</span>
169:         <span class="ruby-keyword kw">else</span>
170:           <span class="ruby-keyword kw">nil</span>
171:         <span class="ruby-keyword kw">end</span>
172: 
173:       <span class="ruby-identifier">tag</span> = <span class="ruby-constant">ActionView</span><span class="ruby-operator">::</span><span class="ruby-constant">Helpers</span><span class="ruby-operator">::</span><span class="ruby-constant">InstanceTag</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-keyword kw">self</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:object</span>))
174:       <span class="ruby-identifier">calendar_date_select_output</span>(
175:         <span class="ruby-identifier">tag</span>.<span class="ruby-identifier">to_input_field_tag</span>( (<span class="ruby-identifier">calendar_options</span>[<span class="ruby-identifier">:hidden</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">calendar_options</span>[<span class="ruby-identifier">:embedded</span>]) <span class="ruby-operator">?</span> <span class="ruby-value str">&quot;hidden&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-value str">&quot;text&quot;</span>, <span class="ruby-identifier">options</span>), 
176:         <span class="ruby-identifier">calendar_options</span>
177:       )
178:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000010" class="method-detail">
        <a name="M000010"></a>

        <div class="method-heading">
          <a href="#M000010" class="method-signature">
          <span class="method-name">calendar_date_select_output</span><span class="method-args">(input, calendar_options = {})</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000010-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/calendar_date_select/lib/calendar_date_select.rb, line 180</span>
180:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calendar_date_select_output</span>(<span class="ruby-identifier">input</span>, <span class="ruby-identifier">calendar_options</span> = {})
181:       <span class="ruby-identifier">out</span> = <span class="ruby-identifier">input</span>
182:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">calendar_options</span>[<span class="ruby-identifier">:embedded</span>]
183:         <span class="ruby-identifier">uniq_id</span> = <span class="ruby-node">&quot;cds_placeholder_#{(rand*100000).to_i}&quot;</span>
184:         <span class="ruby-comment cmt"># we need to be able to locate the target input element, so lets stick an invisible span tag here we can easily locate</span>
185:         <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">content_tag</span>(<span class="ruby-identifier">:span</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">:style</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;display: none; position: absolute;&quot;</span>, <span class="ruby-identifier">:id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">uniq_id</span>)
186:         
187:         <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">javascript_tag</span>(<span class="ruby-node">&quot;new CalendarDateSelect( $('#{uniq_id}').previous(), #{options_for_javascript(calendar_options)} ); &quot;</span>)
188:       <span class="ruby-keyword kw">else</span>
189:         <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot; &quot;</span>
190:         
191:         <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">image_tag</span>(<span class="ruby-constant">CalendarDateSelect</span>.<span class="ruby-identifier">image</span>, 
192:             <span class="ruby-identifier">:onclick</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-node">&quot;new CalendarDateSelect( $(this).previous(), #{options_for_javascript(calendar_options)} );&quot;</span>,
193:             <span class="ruby-identifier">:style</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'border:0px; cursor:pointer;'</span>)
194:       <span class="ruby-keyword kw">end</span>
195:       
196:       <span class="ruby-identifier">out</span>
197:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000008" class="method-detail">
        <a name="M000008"></a>

        <div class="method-heading">
          <a href="#M000008" class="method-signature">
          <span class="method-name">calendar_date_select_process_options</span><span class="method-args">(options)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
extracts any options passed into calendar date select, appropriating them
to either the Javascript call or the html tag.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000008-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/calendar_date_select/lib/calendar_date_select.rb, line 108</span>
108:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calendar_date_select_process_options</span>(<span class="ruby-identifier">options</span>)
109:       <span class="ruby-identifier">calendar_options</span> = {}
110:       <span class="ruby-identifier">callbacks</span> = [<span class="ruby-identifier">:before_show</span>, <span class="ruby-identifier">:before_close</span>, <span class="ruby-identifier">:after_show</span>, <span class="ruby-identifier">:after_close</span>, <span class="ruby-identifier">:after_navigate</span>]
111:       <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">key</span> <span class="ruby-keyword kw">in</span> [<span class="ruby-identifier">:time</span>, <span class="ruby-identifier">:valid_date_check</span>, <span class="ruby-identifier">:embedded</span>, <span class="ruby-identifier">:buttons</span>, <span class="ruby-identifier">:format</span>, <span class="ruby-identifier">:year_range</span>, <span class="ruby-identifier">:month_year</span>, <span class="ruby-identifier">:popup</span>, <span class="ruby-identifier">:hidden</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">callbacks</span>
112:         <span class="ruby-identifier">calendar_options</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">key</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">key</span>)
113:       <span class="ruby-keyword kw">end</span>
114:       
115:       <span class="ruby-comment cmt"># if passing in mixed, pad it with single quotes</span>
116:       <span class="ruby-identifier">calendar_options</span>[<span class="ruby-identifier">:time</span>] = <span class="ruby-value str">&quot;'mixed'&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">calendar_options</span>[<span class="ruby-identifier">:time</span>].<span class="ruby-identifier">to_s</span><span class="ruby-operator">==</span><span class="ruby-value str">&quot;mixed&quot;</span>
117:       <span class="ruby-identifier">calendar_options</span>[<span class="ruby-identifier">:month_year</span>] = <span class="ruby-node">&quot;'#{calendar_options[:month_year]}'&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">calendar_options</span>[<span class="ruby-identifier">:month_year</span>]
118:       
119:       <span class="ruby-comment cmt"># if we are forcing the popup, automatically set the readonly property on the input control.</span>
120:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">calendar_options</span>[<span class="ruby-identifier">:popup</span>].<span class="ruby-identifier">to_s</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;force&quot;</span>
121:         <span class="ruby-identifier">calendar_options</span>[<span class="ruby-identifier">:popup</span>] = <span class="ruby-value str">&quot;'force'&quot;</span>
122:         <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:readonly</span>] = <span class="ruby-keyword kw">true</span> 
123:       <span class="ruby-keyword kw">end</span>
124:       
125:       <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">vdc</span>=<span class="ruby-identifier">calendar_options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:valid_date_check</span>))
126:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">vdc</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">&quot;;&quot;</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">vdc</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">&quot;function&quot;</span>)
127:           <span class="ruby-identifier">throw</span> <span class="ruby-value str">&quot;:valid_date_check function is missing a 'return' statement.  Try something like: :valid_date_check =&gt; 'if (date &gt; new(Date)) return true; else return false;'&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">vdc</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">&quot;return&quot;</span>);
128:         <span class="ruby-keyword kw">end</span>
129:         
130:         <span class="ruby-identifier">vdc</span> = <span class="ruby-node">&quot;return(#{vdc})&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">vdc</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">&quot;return&quot;</span>)
131:         <span class="ruby-identifier">vdc</span> = <span class="ruby-node">&quot;function(date) { #{vdc} }&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">vdc</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">&quot;function&quot;</span>)
132:         <span class="ruby-identifier">calendar_options</span>[<span class="ruby-identifier">:valid_date_check</span>] = <span class="ruby-identifier">vdc</span>
133:       <span class="ruby-keyword kw">end</span>
134:       
135:       <span class="ruby-identifier">calendar_options</span>[<span class="ruby-identifier">:popup_by</span>] <span class="ruby-operator">||=</span> <span class="ruby-value str">&quot;this&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">calendar_options</span>[<span class="ruby-identifier">:hidden</span>]
136:       
137:       <span class="ruby-comment cmt"># surround any callbacks with a function, if not already done so</span>
138:       <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">key</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">callbacks</span>
139:         <span class="ruby-identifier">calendar_options</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-node">&quot;function(param) { #{calendar_options[key]} }&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">calendar_options</span>[<span class="ruby-identifier">key</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-value str">&quot;function&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">calendar_options</span>[<span class="ruby-identifier">key</span>]
140:       <span class="ruby-keyword kw">end</span>
141:       
142:       <span class="ruby-identifier">calendar_options</span>[<span class="ruby-identifier">:year_range</span>] = <span class="ruby-identifier">format_year_range</span>(<span class="ruby-identifier">calendar_options</span>[<span class="ruby-identifier">:year_range</span>] <span class="ruby-operator">||</span> <span class="ruby-value">10</span>)
143:       <span class="ruby-identifier">calendar_options</span>
144:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000006" class="method-detail">
        <a name="M000006"></a>

        <div class="method-heading">
          <a href="#M000006" class="method-signature">
          <span class="method-name">calendar_date_select_tag</span><span class="method-args">( name, value = nil, options = {})</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000006-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/calendar_date_select/lib/calendar_date_select.rb, line 78</span>
78:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calendar_date_select_tag</span>( <span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">options</span> = {})
79:       <span class="ruby-identifier">calendar_options</span> = <span class="ruby-identifier">calendar_date_select_process_options</span>(<span class="ruby-identifier">options</span>)
80:       <span class="ruby-identifier">value</span> = <span class="ruby-identifier">format_time</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">calendar_options</span>)
81:       
82:       <span class="ruby-identifier">calendar_options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:format</span>)
83:       
84:       <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:id</span>] <span class="ruby-operator">||=</span> <span class="ruby-identifier">name</span>
85:       <span class="ruby-identifier">tag</span> = <span class="ruby-identifier">calendar_options</span>[<span class="ruby-identifier">:hidden</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">calendar_options</span>[<span class="ruby-identifier">:embedded</span>] <span class="ruby-operator">?</span> 
86:         <span class="ruby-identifier">hidden_field_tag</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>, <span class="ruby-identifier">options</span>) <span class="ruby-operator">:</span>
87:         <span class="ruby-identifier">text_field_tag</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>, <span class="ruby-identifier">options</span>)
88:       
89:       <span class="ruby-identifier">calendar_date_select_output</span>(<span class="ruby-identifier">tag</span>, <span class="ruby-identifier">calendar_options</span>)
90:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000007" class="method-detail">
        <a name="M000007"></a>

        <div class="method-heading">
          <a href="#M000007" class="method-signature">
          <span class="method-name">format_time</span><span class="method-args">(value, options = {})</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000007-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/calendar_date_select/lib/calendar_date_select.rb, line 92</span>
 92:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format_time</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">options</span> = {})
 93:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value str">&quot;strftime&quot;</span>)
 94:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:format</span>]
 95:           <span class="ruby-identifier">value</span> = <span class="ruby-identifier">value</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:format</span>])
 96:         <span class="ruby-keyword kw">else</span>
 97:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">:time</span>
 98:             <span class="ruby-identifier">value</span> = <span class="ruby-identifier">value</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-constant">CalendarDateSelect</span>.<span class="ruby-identifier">date_format_string</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:time</span>]))
 99:           <span class="ruby-keyword kw">else</span>
100:             <span class="ruby-identifier">value</span> = <span class="ruby-constant">CalendarDateSelect</span>.<span class="ruby-identifier">format_date</span>(<span class="ruby-identifier">value</span>)
101:           <span class="ruby-keyword kw">end</span>
102:         <span class="ruby-keyword kw">end</span>
103:       <span class="ruby-keyword kw">end</span>
104:       <span class="ruby-identifier">value</span>
105:    <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>